<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="style.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	String basePath = request.getContextPath();
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色信息维护</title>

<body style="margin: 0; padding: 1px">
	<div id="toolbar">
		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-add" plain="true"
			onclick="newArea()">新增角色信息</a> <a href="javascript:void(0);"
			class="easyui-linkbutton" iconCls="icon-edit" plain="true"
			onclick="editArea()">编辑角色信息</a> <a href="javascript:void(0);"
			class="easyui-linkbutton" iconCls="icon-remove" plain="true"
			onclick="destroyArea()">删除角色信息</a>
	</div>
	<table id="roleGrid" style=""></table>
</body>
<script type="text/javascript">
	$(document).ready(function() {
		$('#roleGrid').datagrid({
			url : '<%=basePath%>/mgrsystem/roleList.do',
			columns : [ [ {
				field : 'id',
				title : '序号',
				checkbox:true
			},{
				field : 'name',
				title : '名称'
			}, {
				field : 'createDate',
				title : '创建日期'
			}, {
				field : 'modifyDate',
				title : '更新日期'
			}, {
				field : 'status',
				title : '状态',
				formatter:function(value,row,index){
					if(value==0){
						return "无效";
					}else{
						return "有效";
					}
				}
			}, {
				field : 'authority',
				title : '权限'
			}, {
				field : 'info',
				title : '备注信息'
			}] ],
			fitColumns:true,
			striped:true,
			nowrap:true,
			loadMsg:"正在加载数据...",
			pagination:true,
			singleSelect:true,
			checkOnSelect:true
		});
		$("#roleGrid").datagrid({
			toolbar: '#toolbar'
		});
	});
	
    <!--新增用户-->
	function newUser() {
		$('#addDlg').dialog('open').dialog('setTitle', '新增用户');
		$('#fm').form('clear');
	}
	<!--编辑用户信息-->
	function destroyUser() {
		//var row = $('#addDlg').datagrid('getSelected');
		alert();
		
	}
</script>
</html>